/**
 * Created by Administrator on 15-11-10.
 */
window.onload=function(){
    var orderId=$.getUrlParam("orderId");
    var url=getUrl();
    $.jsonp({
        url: 'http://'+url+'/api/order/order_detail-'+orderId,
        data: {orderId:orderId},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            var complied_tpl = juicer($("#zhifu_tpl").text());
            var html = complied_tpl.render(data);
            $(".moredetail").append(html);
        },
        error: function (xOptions,textStatus) {
        }
    });


   $('#pay').click(function() {
//      $.jsonp({
//          url: 'http://'+url+'/api/order/test_pay',
//          data: {orderId:orderId,payChannel:1},
//          callbackParameter: "callback",
//          success: function (data, textStatus, xOptions) {
//          alert("111222===="+data.subject+",,,"+data.body+",,,"+data.total_fee+",,,"+data.out_trade_no+",,,"+data.notify_url)
//             payByAlipay(data.subject,data.body,data.total_fee,data.out_trade_no,data.notify_url);
//          },
//          error: function (xOptions,textStatus) {
//          }
//      });
   });
}
